<include file='Public/header' />
	</style>
	 <style >
	   .suoluetu{
	    margin:0 auto;
	    width:95%;
	   }
		a:link,a:visited{
			text-decoration:none;  /*超链接无下划线*/
		}
		.xinfo{
			font-size:15px;
		}
	   .daohang-lable{
		   margin-left:2%;
		   height:80px;
		   font-size:40px;
		   
	   }
	   .togo{
		font-size:20px;
	   }
	   #pageButton{
			width:80%;
			margin-left:10%;
	   }
	   #left{
			float:left;
			width:22%;
			border:solid 2px #D9D9D9;
	   }
	   #right{
			width:80%;
			margin-left:25%;
	   }
	   #footer{
			width:100%;
			text-align:center;
	   }
	   #mainbody{
			width:80%;
			margin-left:5%;
	   }
	    #mm{
			width:100%;
	   }
	   #px{
		width:100%;
		height:45px;
		background-color:#D9D9D9;	
	   }
	   .pxfont{
		float:left;
		width:50px;
		height:40px;
		line-height:28px;
		text-align:center;
	   }
	   .paixu{
			float:left;
			width:65px;
			height:40px;
	   }
	   .btn-px{
			background-color:white;
			border-radius:5px;
	   }
	   .title{
			text-align:center;
	   }
		.disdiv{
			float:left;
			width:80%;
			height:300px;
			margin-left:20px;
		}
		.imgpic{
			margin-left:25px;
		}
		.caption{
			text-align:center
		}
		#maincontent{
			width:100%;
			
		}
		.price{
			font-size:20px;
			color:red;
		}
		.captionfoot{
			width:100%;
			margin-left:5%;
			margin-bottom:2%;
		}
		.captionfoot{
			width:40px;
		}
		.rcaptionfoot{
			width:100px;
		}
		.btn-car{
			border-radius:5px;
			background-color:white;
			width:120px;
		}
		.min{
			border-radius:5px;
			background-color:white;
			width:30px;
		}
		.add{
			border-radius:5px;
			background-color:white;
			width:30px;
		}
		.thumbnail{
			height:380px;
		}
		.thumbnail:hover{
			border:3px green solid;
		}
		#shoppingcar-block{
			position:fixed;
			top:40%;
			right:20px;
			left: 91%;
			width:6%;
			height:200px;
			
			text-align:center;
			color:grey;
		}
		#displayshopcar{
			position:fixed;
			top:180px;
			right:120px;
			width:300px;
			height:380px;
			background-color:white;
			border:3px solid grey;
			border-radius:5px;
			display:none;
			overflow-y:auto;
		
		}
		#displayshopcar-top{
			background-color:grey;
			width:100%;
			height:70px;
		}
		#exit{
			margin-left:5px;
			font-size:15px;
			width:50px;
		}
		#jiesuan{
			width:50%;
			font-size:20px;
			margin-left:25%;
			font-color:green;
			background-color:green;
		}
		#jiesuan:hover{
			font-color:green;
			background-color:blue;
		}
		.cargoods{
			width:100%;
			height:80px;
			border:1px solid green;
			border-radius:3px;
		}
		.cp{
			width:30%;
			float:left;
		}
		.sprice{
			float:left;
			width:40%;
		}
		.breadcrumb{
			width:105%;
		}
     </style>
	 
	 <div id="mainbody">
	 <ol class="breadcrumb">
		<li><a href="{:U('Index/index')}">首页</a></li>
		<li class="active"><a href="">搜索结果</a></li>
	</ol>
 		<div id="left">
		<p class="title">销量排行榜</p>
		<hr>
		<div class='row'>
			<volist name="phblist" id="voo">
			<?php 
			$picpath=str_replace("thumb_","",$voo['pic']);	?>
			<div class="disdiv">
				  <a onmouseover='window.location.href='#''
				  style='cursor:pointer;' href="{:U('List/showgood',array('id'=>$voo['id']))}">
					 <img class="imgpic" src='__PUBLIC__/photo/{$picpath}'  width="80%" height="150px"
					 alt='通用的占位符缩略图'>
				 </a>
					 <div class='caption' >
						<a href="{:U('List/showgood',array('id'=>$voo[id]))}">{$voo.name}</a> <br>
						<a  href="{:U('List/showgood',array('id'=>$voo[id]))}" >{$voo.lintro}</a>
						
					 <p>￥{$voo.price}元/{$voo.danwei}</p></div>
					 <hr>
			</div>
			</volist>
		</div>			
		</div><!--left-->
		<div id="right">
			<hr width="100%" style="border:solid 1px green">
			<div id="px"><!--排序框-->
			<div class="pxfont"><p>排序:</p></div>
			<div class="paixu">
			<!--时间排序-->
				<form method="GET">
					<input type="hidden" name="searchname" id="search" placeholder="蔬菜名称"
					<?php  if(isset($searchname)) echo "value='".$searchname."'";?>>	
					<input type="hidden" name="mode" value="id">
					<input type="hidden" name="name" value="{$classmeg['name']}">
					<if condition="$classmeg['mode'] eq 'id'"> 
						<if condition="($classmeg['dec'] eq 'desc')">
							<input type="hidden" name="dec" value="asc">
							<button type="submit" class="btn-px">
							时间<span class="glyphicon glyphicon-arrow-up"></span>
							</button>
						<else />
							<input type="hidden" name="dec" value="desc">
							<button type="submit" class="btn-px">
							时间<span class="glyphicon glyphicon-arrow-down"></span>
							</button>
						</if>
					<else /> 
						<input type="hidden" name="dec" value="desc">
						<button type="submit" class="btn-px">
							时间<span class="glyphicon glyphicon-arrow-down"></span>
							</button>
					</if>
				</form>
			</div>
			<div class="paixu">
			<!--销量排序-->
				<form method="GET">
					<input type="hidden" name="searchname" id="search" placeholder="蔬菜名称"
					<?php  if(isset($searchname)) echo "value='".$searchname."'";?>>	
					<input type="hidden" name="mode" value="sum">
					<input type="hidden" name="name" value="{$classmeg['name']}">
					<if condition="$classmeg['mode'] eq 'sum'"> 
						<if condition="($classmeg['dec'] eq 'desc')">
							<input type="hidden" name="dec" value="asc">
							<button type="submit" class="btn-px">
							销量<span class="glyphicon glyphicon-arrow-up"></span>
							</button>
						<else />
							<input type="hidden" name="dec" value="desc">
						<button type="submit" class="btn-px">
						销量<span class="glyphicon glyphicon-arrow-down"></span>
						</button>
						</if>
					<else /> 
						<input type="hidden" name="dec" value="desc">
						<button type="submit" class="btn-px">
						销量<span class="glyphicon glyphicon-arrow-down"></span>
						</button>
					</if>
				</form>
			</div>
			<div class="paixu">
			<!--价格排序-->
				<form method="GET">
					<input type="hidden" name="searchname" id="search" placeholder="蔬菜名称"
					<?php  if(isset($searchname)) echo "value='".$searchname."'";?>>	
					<input type="hidden" name="mode" value="price">
					<input type="hidden" name="name" value="{$classmeg['name']}">
					<if condition="$classmeg['mode'] eq 'price'"> 
						<if condition="($classmeg['dec'] eq 'desc')">
							<input type="hidden" name="dec" value="asc"><!--升序-->
							<button type="submit" class="btn-px">
							价格<span class="glyphicon glyphicon-arrow-up"></span>
							</button>
						<else />
							<input type="hidden" name="dec" value="desc">
							<button type="submit" class="btn-px">
							价格<span class="glyphicon glyphicon-arrow-down"></span>
							</button>
						</if>
					<else /> 
						<input type="hidden" name="dec" value="desc"><!--降序-->
						<button type="submit" class="btn-px">
						价格<span class="glyphicon glyphicon-arrow-down"></span>
						</button>
					</if>
				</form>
			</div>
			</div><!--排序框-->
			<div id="maincontent">
				<hr width="100%" style="border:solid 1px green">
				<div class="row">
				<volist name="list" id="voo">
				<?php $picpath=str_replace("thumb_","",$voo['pic']);	?>
					<div class="col-sm-6 col-md-3">
					<div class="thumbnail">
					 <a class="pp" href="{:U('List/showgood',array('id'=>$voo[id],'cid'=>$classmeg['id'],'cname'=>$classmeg['name']))}">
						<img src='__PUBLIC__/photo/{$picpath}'  width="120px" height="150px"
						 alt="通用的占位符缩略图">
						<div class="caption">
							<p>{$voo.name}&nbsp&nbsp|&nbsp&nbsp{$voo.lintro}</p>
						 <p class="price" >￥{$voo.price}元/{$voo.danwei}</p></a>
						</div>
						<div class="captionfoot">
						<div class="lcaptionfoot">
						 <if condition="0 lt $voo['kucun']"> <p>有货</p> <else /> <p>无货</p></if>
						 </div>
						 <div class="rcaptionfoot">
								<input class="min" name="" type="button" value="-" onclick="javascript:butjian(this)"/>
								<input class="text_box" name="goodnum" type="text" value="1" style="width:25px;" />
								<input class="add" name="" type="button" onclick="javascript:butjia(this)" value="+" />
								<hr>
								
								<input name="" type="hidden"  value="{$voo.id}" />
								<input name="" type="hidden"  value="{$voo.danwei}" />
								<input name="" type="hidden"  value="{$picpath}" />
								<input name="" type="hidden"  value="{$voo.price}" />
								<input name="" type="hidden"  value="{$voo.name}" />
								<button type="submit" class="btn-car" onclick="javascript:addGoods(this)" ><span class="glyphicon glyphicon-shopping-cart"></span>加入购物车</button>
						 </div>						  
						 </div>
					</div>
					 </div>
				 </volist>
				</div><!--row-->
				
				<div class="text-center">
				<ul class="pagination">{$page}</ul>
				</div>
			</div><!--maincontent-->
		</div><!--right-->
	</div><!--mainbody-->
	
	<div id="displayshopcar">
	<form method="POST" action="{:U('Pay/index')}">
		<div id="displayshopcar-top">
			<a id="exit" href="javascript:hidden('displayshopcar')">X</a><br>
			<input id="jiesuan" type="submit" value="￥去结算">
		</div>
		<div>总量：<span id="allnum">
		<?php if(isset($_COOKIE['badge'])) echo $_COOKIE['badge']; else echo "0";?>
		</span>总价：<span id="allprice">
		<?php if(isset($_COOKIE['allprice'])) echo $_COOKIE['allprice'];else echo "0";?></span>元</div>
		<hr>
		<div id="goods">
			<?php if(isset($_COOKIE['content'])) echo unescape($_COOKIE['content']);?>
		</div>
		</form>
	</div>
	<div id="shoppingcar-block">
		<a href="javascript:show('displayshopcar')">
			<span class="badge" id="badge"><?php if(isset($_COOKIE['badge'])) echo $_COOKIE['badge']; else echo "0";?></span><img src="__PUBLIC__/assest/image/shopcar.png" width="100%">
		</a>
		<p>购物车</p>
		<hr>
	</div>
</body>
<include file='Public/footer' />
</html>